package com.example.system.service.serviceimpl;

import com.example.system.mapper.DmessageMapper;
import com.example.system.pojo.Dmessage;
import com.example.system.service.IMessageService;
import com.example.system.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;

public class MessageImpl implements IMessageService {
    @Autowired
    DmessageMapper dmessageMapper;
    @Override
    public ServerResponse messageAdd(Dmessage dmessage) {


        int insert = dmessageMapper.insert(dmessage);
        if(insert>0){
            return ServerResponse.createSuccess("添加成功");
        }else{
            return ServerResponse.createError("添加有误");
        }


    }
}
